CXX=g++
CXXFLAGS=-O2

all: main.o ga.o league.o population.o genome.o decision.o
	$(CXX) $(CXXFLAGS) -o prisoner main.o ga.o league.o population.o genome.o decision.o

main.o: main.cpp
	$(CXX) -c $(CXXFLAGS) -o main.o main.cpp

ga.o: ga.cpp
	$(CXX) -c $(CXXFLAGS) -o ga.o ga.cpp

league.o: league.cpp
	$(CXX) -c $(CXXFLAGS) -o league.o league.cpp

population.o: population.cpp
	$(CXX) -c $(CXXFLAGS) -o population.o population.cpp

genome.o: genome.cpp
	$(CXX) -c $(CXXFLAGS) -o genome.o genome.cpp

decision.o: decision.cpp
	$(CXX) -c $(CXXFLAGS) -o decision.o decision.cpp


main.cpp: ga.h population.h genome.h

ga.cpp: ga.h

league.cpp: league.h

population.cpp: population.h

genome.cpp: genome.h

decision.cpp: decision.h


ga.h: population.h league.h genome.h prisoner.h

league.h: population.h genome.h

population.h: genome.h

genome.h: decision.h prisoner.h



clean:
	rm -f *.o
	rm -f prisoner

clean2:
	rm -f *.o
	rm -f prisoner
